import request from '@/utils/request'

// 查询计量单位库列表
export function listUnit(query) {
  return request({
    url: '/lims/store/unit/list',
    method: 'get',
    params: query
  })
}

// 查询计量单位库详细
export function getUnit(unitId) {
  return request({
    url: '/lims/store/unit/' + unitId,
    method: 'get'
  })
}

// 查询详情里面的下拉框
export function getUnitList(query) {
  return request({
    url: '/lims/store/unit/unitlist',
    method: 'get',
    params: query
  })
}


// 计量单位库同步
export function postUnit() {
  return request({
    url: '/lims/store/unit',
    method: 'post',
    timeOutValidate: false,
  })
}

// 计量单位库同步缓存
export function getUnitStatus() {
  return request({
    url: '/lims/store/unit/status',
    method: 'get',
  })
}